//
//  HJIconTitleRedPointCell.m
//  KaiChat
//
//  Created by lx on 2024/1/18.
//

#import "HJIconTitleRedPointCell.h"

@interface HJIconTitleRedPointCell()

@property (nonatomic, weak) UIView *redPointView;

@end


@implementation HJIconTitleRedPointCell

- (void)settingSubView {
    [super settingSubView];
    
    
    _redPointView = [UIView addToView:self.contentView];
    _redPointView.addCornerRadius(4);
    _redPointView.hidden = YES;
    _redPointView.backgroundColor = UIColor.tj_redColor;
    [_redPointView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.titleLabel.mas_right).offset(8);
        make.centerY.offset(0);
        make.width.height.offset(8);
    }];
}

- (void)setModel:(HJCellModel *)model {
    [super setModel:model];
    
    _redPointView.hidden = !model.showRedPoint;
}
 

@end
